//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//   PACKAGE : dcf
//   FILE    : DeregisterMessage.java
//   CLASS   : DeregisterMessage
//   DATE    : 2006-04-01
//   
//   DESCRIPTION
//   The DeregisterMessage class is a message used to remove a service from the locator service.
//   
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//   Copyright (c) 2006 by Hal Smith
//
//   Permission is hereby granted, free of charge, to any person obtaining a copy of this source code 
//   (the "Code")to deal with the Code without restriction, including without limitation the rights to use, copy,
//   modify, merge, publish and distribute the Code, and to permit persons to whom the Code is furnished to do 
//   so, subject to the following conditions:
//
//   The above copyright notice and this permission notice shall be included in all copies or substantial 
//   portions of the Software.
//   
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//   VERSION HISTORY
//
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

package dcf;


class DeregisterMessage extends Message {

	// The name of the service to remove.
	//
	private String serviceName;
	
	
	// Constructor.
	//
	// This operation initializes the message with the provide service name to be deregistered. If the 
	// supplied service name is null the operation will log an error and throw an InitializationException.
	// There are no exceptions thrown by this operation.
	//
	public DeregisterMessage(String initServiceName) throws InitializationException {
		
		// If the supplied service name is null, log an error and throw an InitializationException.
		//
		if (initServiceName == null) {
					
			System.out.println("DeregisterMessage.DeregisterMessage(initServiceName):");
			System.out.println("   The provided service name is null.");			
			
			throw new InitializationException();
			
		} else {
	
			serviceName = initServiceName;
		
		}
		
	} // consrtuctor
	
	
	// This operation returns the service name to be deregistered. There are no exceptions thrown by this 
	// operation.
	//
	public String getServiceName() {

		return serviceName;
	
	} // getServiceName()
		

} // DeregisterMessage
